<template>
  <div id="app">
    <div class="main">
      <!-- 头部样式 -->
        <router-view  @get-player-id="getPlayerId" @get-play-all-id="getPlayAllId"></router-view>
        <paly v-show="playerId" :player-id="playerId" :list-id="listId" @set-player-id="setPlayerId" @get-player-id="getPlayerId"></paly>
    </div>
   
  </div>
</template>
<script>
import Paly from './components/paly.vue'
export default {
  components: { Paly},
  data(){
    return{
      playerId:null,
      listId:null
    }
  },
  methods:{
    //获取子组件播放歌曲id
  getPlayerId(id){
   
      this.playerId=id
    

  },
  getPlayAllId(id){
    console.log(id)
    this.listId=id
  },
  setPlayerId(id){
    this.playerId=id
  }
  }
}
</script>
<style lang="less">
@import "./assets/css/base.css";
</style>
